package com.java54.wcm6;

public class MediaAdapter implements MediaPlayer {
	AdvancedMediaPlayer advancedMediaPlayer;

	public MediaAdapter(String type) {
		if (type.equalsIgnoreCase("vlc")) {
			advancedMediaPlayer = new PalyVlc();
		} else if (type.equalsIgnoreCase("mp4")) {
			advancedMediaPlayer = new PalyMp4();
		}
	}

	@Override
	public void PlayMp3(String type, String name) {
		if (type.equalsIgnoreCase("vlc")) {
			advancedMediaPlayer.PalyVlc(name);
		} else if (type.equalsIgnoreCase("mp4")) {
			advancedMediaPlayer.PalyMp4(name);
		}

	}
}
